<template>
    <div>
        <myHead title="影院" :show="true"></myHead>
        <mySearch></mySearch>
            
            <!-- <van-cell-group>
            </van-cell-group> -->
                <cinemaList :list="cinemas"></cinemaList> 
            <!-- <van-tab v-for='(l,i) in list' :name="i" :key="i" :title="l.showDate | dateFormat('YY-MM-DD')">
                <cinemaList :list="cinemas"></cinemaList>
            </van-tab> -->
        
    </div>
</template>
<script>
import {Dialog} from 'vant'
export default {
    setup() {
        
    },
    name:'cinema',
    data(){
        return{
            list:[],
            cinemas:[]
        }
    },
    methods:{
        getcinemasList(cinemaIds){
            // 影院列表  
            this.$ajax.postmaizuodata({
                cityId:this.cityinfo.cityId,
                cinemaIds:cinemaIds.join(",")
            },{
                'X-Host': 'mall.film-ticket.cinema.batch-cinema'
            }).then(res=>{
                if(res.code==200){
                    this.list = res.result.data.cinemas
                }
            })
        },
    
    },
    mounted(){
        this.$ajax.getmaizuodata({
            cityId:this.cityinfo.cityId
        },{
            'X-Host': 'mall.film-ticket.cinema.list'
        })
        .then(res=>{
            if(res.code==200){
                this.cinemas = res.result.data.cinemas;
            }
        })

        
    },
    created(){
         if(!this.cityinfo){
             Dialog.alert({
                 title: '未定位',
                message: '请手动定位当前城市',
            }).then(() => {
                this.$router.push({name:'city'})
                // on close
            });
        }else{
        }
    }
}
</script>
<style scoped>
    .test{
        width: 200px;
        height: 200px;
        background-color: aquamarine;
    }
</style>